import time
from selenium import webdriver
from selenium.webdriver.edge.options import Options
from selenium.webdriver.edge.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By



driver_path = ChromeDriverManager().install()
edge_options = Options()
edge_options.add_argument("--remote-allow-origins=*")
driver = webdriver.Chrome(service=Service(driver_path), options=edge_options)

print("打开百度首页")
driver.get("https://www.baidu.com")



driver.find_element(By.CSS_SELECTOR, "#kw").send_keys("凤凰传奇")



driver.find_element(By.CSS_SELECTOR, "#su").click()
time.sleep(3)


driver.quit()
